#include"ValuesData.h"
#include<regex>

void ValuesData::setValues(const std::string &data){
  auto &&s = std::regex_replace(data, std::regex("&"), "=");
  std::regex eq("=");
  std::regex_token_iterator<std::string::iterator> it(s.begin(), s.end(), eq, -1);
  std::regex_token_iterator<std::string::iterator> itend;
  while(it != itend){
    auto key = *it++;
    values[key] = *it++;
  }
}
